package com.fang.mmy.user.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloWordController
 * @Author kebukeyi
 * @Date 2022/8/7 20:55
 * @Description https://blog.csdn.net/qq_38374397/article/details/125554557
 * @Version 1.0.0
 */
@RestController
@RequestMapping("/user")
@RefreshScope
public class HelloWordController {

    @Value("${fang-mmy-user.test.userId}")
    private String userId;

    @GetMapping("getUserConfigTest")
    public String getUserConfigTest() {
        return userId != null ? userId : "未获取到配置";
    }

}
